package com.yfp.operation.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yfp.common.core.web.page.TableDataInfo;
import com.yfp.operation.domain.ActivitySignIns;
import com.yfp.operation.domain.dto.*;
import com.yfp.operation.domain.vo.*;
import com.yfp.operation.domain.dto.*;
import com.yfp.operation.domain.vo.*;

import java.util.Date;

/**
 *
 * @description 针对表【activity_sign_ins(打卡管理主表)】的数据库操作Service
 * @createDate 2025-01-02 10:22:14
 */
public interface ActivitySignInsService extends IService<ActivitySignIns> {

    void create(ActivitySignInsCreateReqDTO activitySignIns);

    TableDataInfo<ActivitySignInsSearchReqVO> searchList(ActivitySignInsSearchReqDTO searchReqDTO);

    TableDataInfo<ActivitySignInsSearchRewardReqVO> searchRewardList(ActivitySignInsSearchRewardReqDTO searchReqDTO);

    TableDataInfo<ActivitySignInsSearchParticipationReqVO> searchParticipationList(ActivitySignInsSearchParticipationReqDTO searchReqDTO);

    TableDataInfo<ActivitySignInsSearchParticipationAwardReqVO> searchParticipationAwardList(ActivitySignInsSearchParticipationAwardReqDTO searchReqDTO);

    ActivitySignInsVO getInfo(Long id);

    void failure(Long id);

    void delete(Long id);

    Boolean createCheck(ActivitySignInsCreateReqDTO activitySignInsCreateReqDTO);

    void createCheck2(ActivitySignInsCreateReqDTO activitySignInsCreateReqDTO);

    /**
     * 获取奖励名称
     *
     * @param rewardId   奖励id
     * @param rewardType 兑换奖品类型:[1优惠券、2礼包、3实体商品]
     * @return
     */
    String getRewardName(Long rewardId, Integer rewardType);

    /**
     * 获取城市名称
     *
     * @param rewardId   奖励id
     * @param rewardType 兑换奖品类型:[1优惠券、2礼包、3实体商品]
     * @return
     */
    String getCityName(Long rewardId, Integer rewardType);

    /**
     * 计算状态
     *
     * @param startTime 开始时间
     * @param endTime   结束时间
     * @return
     */
    Integer calculateStatus(Date startTime, Date endTime);

    /**
     * 增加打卡次数
     *
     * @param clientId
     * @param cityName
     * @return
     */
    void incrementCount(String clientId, String cityName);

    void checkAndUpdateAllStatus();
}
